<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="include :: header"></head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="modal fade" id="modal-viewAdj">
    <div class="modal-dialog" style="width:80%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">查看库存调整</h4>
            </div>
            <div class="modal-body">
                <form id="halfAdjViewForm" class="form-horizontal">
                    <input type="hidden" name="idAppr" id="idAppr">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="col-md-6">
                                <h4 class="text-center">调整前</h4>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">物料描述</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadBeforeMatName" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">在库数量</label>
                                    <div class="col-sm-8">
                                        <input type="value" class="form-control" name="aadBeforeNum" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单价（元）</label>
                                    <div class="col-sm-8">
                                        <input type="value" class="form-control" name="aadBeforePrice" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单位</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadBeforeUnit" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">图号</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadBeforeDrawingNo" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">品牌</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadBeforeBrand" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">项目编号</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadBeforeProjectCode" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">项目名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadBeforeProjectName" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">部位名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadBeforePart" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <!--<div class="form-group">-->
                                    <!--<label class="col-sm-4 control-label">存放状态</label>-->
                                    <!--<div class="col-sm-8">-->
                                        <!--<input type="text" class="form-control" name="aadBeforeMakingPiecesStatus" placeholder="" readonly="readonly">-->
                                    <!--</div>-->
                                <!--</div>-->
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">物料分类</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadBeforeMatType" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <h4 class="text-center">调整后</h4>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">物料描述</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterMatName" id="aadAfterMatName"  placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">在库数量</label>
                                    <div class="col-sm-8">
                                        <input type="value" class="form-control" name="aadAfterNum" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单价（元）</label>
                                    <div class="col-sm-8">
                                        <input type="value" class="form-control" name="aadAfterPrice"  placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单位</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterUnit" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">图号</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterDrawingNo" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">品牌</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterBrand" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">项目编号</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterProjectCode" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">项目名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterProjectName" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">部位名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterPart" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                                <!--<div class="form-group">-->
                                    <!--<label class="col-sm-4 control-label">存放状态</label>-->
                                    <!--<div class="col-sm-8">-->
                                        <!--<input type="text" class="form-control" name="aadAfterMakingPiecesStatus" placeholder="" readonly="readonly">-->
                                    <!--</div>-->
                                <!--</div>-->
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">物料分类</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterMatType" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">调整原因</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="aadAfterSpecialInstructions" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade"id="modal-viewCreatAdj">
    <div class="modal-dialog" style="width:80%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">查看新增库存调整</h4>
            </div>
            <div class="modal-body">
                <form id="halfAdjViewCreatForm" class="form-horizontal">
                    <input type="hidden" name="creatId" id="creatId">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">物料描述</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterMatName"  placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">在库数量</label>
                                    <div class="col-sm-8">
                                        <input type="value" class="form-control" name="aadAfterNum" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单价（元）</label>
                                    <div class="col-sm-8">
                                        <input type="value" class="form-control" name="aadAfterPrice" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">单位</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterUnit"  placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">图号</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterDrawingNo" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">品牌</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterBrand" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">SAP物料编码</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterSapMatCode" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">项目编号</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterProjectCode" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">项目名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterProjectName" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">部位名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterPart" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <!--<div class="col-md-6">-->
                                <!--<div class="form-group">-->
                                    <!--<label class="col-sm-4 control-label">存放状态</label>-->
                                    <!--<div class="col-sm-8">-->
                                        <!--<input type="text" class="form-control" name="aadAfterMakingPiecesStatus" placeholder="" readonly="readonly">-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</div>-->
                            <!--<div class="col-md-6">-->
                                <!--<div class="form-group">-->
                                    <!--<label class="col-sm-4 control-label">是否成品</label>-->
                                    <!--<div class="col-sm-8">-->
                                        <!--<input type="text" class="form-control" name="aadAfterIfFinishedProduct" placeholder="" readonly="readonly">-->
                                    <!--</div>-->
                                <!--</div>-->
                            <!--</div>-->
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">区位</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterPosition" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">仓位</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterWhiName" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">跟踪号</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterTrackCode" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">物料分类</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterMatType" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">箱号</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterCaseNo" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">装箱日期</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterBoxingDate" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">在库类型</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterStockType" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">备注</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterRemark" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-12">
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">调整原因</label>
                                    <div class="col-sm-10">
                                        <input type="text" class="form-control" name="aadAfterSpecialInstructions" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="modal-viewCount">
    <div class="modal-dialog" style="width:80%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">查看库存盘点</h4>
            </div>
            <div class="modal-body">
                <form id="halfCountApprForm" class="form-horizontal">
                    <input type="hidden" id="idCountAppr" name="aadId">
                    <div class="row">
                        <div class="col-md-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">物料描述</label>
                                    <div class="col-sm-8">
                                        <input type="text" class="form-control" name="aadAfterMatName" placeholder="" readonly="readonly">
                                    </div>
                                </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">损溢差</label>
                                <div class="col-sm-8">
                                    <input type="value" class="form-control" name="ajaDeOvNum" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">单价（元）</label>
                                <div class="col-sm-8">
                                    <input type="value" class="form-control" name="aadAfterPrice" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">单位</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterUnit" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">图号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterDrawingNo" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">品牌</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterBrand" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">SAP物料编码</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterSapMatCode" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">项目编号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterProjectCode" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">项目名称</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterProjectName" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">部位名称</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterPart" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">区位</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterPosition" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">仓库</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterWhiName" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">跟踪号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterTrackCode" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">物料分类</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterMatType" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">箱号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterCaseNo" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">装箱日期</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterBoxingDate" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">在库类型</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterStockType" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">备注</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterRemark" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">调整原因</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="aadAfterSpecialInstructions" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="modal-viewCountCreate">
    <div class="modal-dialog" style="width:80%">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title">查看新增库存盘点</h4>
            </div>
            <div class="modal-body">
                <form id="halfCountCreateApprForm" class="form-horizontal">
                    <input type="hidden" id="idCountCreateAppr" name="aadId">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">物料描述</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterMatName" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">损溢差</label>
                                <div class="col-sm-8">
                                    <input type="value" class="form-control" name="ajaDeOvNum" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">单价（元）</label>
                                <div class="col-sm-8">
                                    <input type="value" class="form-control" name="aadAfterPrice" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">单位</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterUnit" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">图号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterDrawingNo" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">品牌</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterBrand" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">SAP物料编码</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterSapMatCode" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">项目编号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterProjectCode" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">项目名称</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterProjectName" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">部位名称</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterPart" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">区位</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterPosition" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">仓库</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterWhiName" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">跟踪号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterTrackCode" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">物料分类</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterMatType" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">箱号</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterCaseNo" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">装箱日期</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterBoxingDate" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">在库类型</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterStockType" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label class="col-sm-4 control-label">备注</label>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" name="aadAfterRemark" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                        <div class="col-md-12">
                            <div class="form-group">
                                <label class="col-sm-2 control-label">调整原因</label>
                                <div class="col-sm-10">
                                    <input type="text" class="form-control" name="aadAfterSpecialInstructions" placeholder="" readonly="readonly">
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>
        </div>
    </div>
</div>

<section class="content-header">
    <h1>库存调整审核列表</h1>
</section>
<section class="content">
    <div class="row">
        <div class="col-xs-12">
            <div class="box">
                <div class="box-header">
                    <form id="queryForm">
                        <div class="row">

                            <div class="form-inline">
                                <div class="form-group" >
                                    <label>项目编号</label>
                                    <input type="text" name="aadAfterProjectCode" class="form-control" placeholder="请输入项目编号">
                                </div>
                                <div class="form-group" >
                                    <label>项目名称</label>
                                    <input type="text" name="aadAfterProjectName" class="form-control" placeholder="请输入项目名称">
                                </div>
                                <div class="form-group" >
                                    <label>物料描述</label>
                                    <input type="text" name="aadAfterMatName" class="form-control" placeholder="请输入物料描述" >
                                </div>



                                <div class="form-group" >
                                    <label>调整类型</label>
                                    <select name="adjStatus" class="form-control">
                                        <option value="" selected="selected">全部</option>
                                        <option value=1>库存调整</option>
                                        <option value=2>库存盘点</option>
                                    </select>
                                </div>

                                <div class="form-group">
                                    <label>仓库</label>
                                    <select name="aadAfterWhiId" class="form-control" >
                                        <option value="" selected="selected">全部</option>
                                        <option th:each="whiIds:${whiIds}" th:value="${whiIds.whiId}"
                                                th:text="${whiIds.whiName}"></option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>调整状态</label>
                                    <select name="aadStatus" class="form-control">
                                        <option value=2 selected="selected">未审核</option>
                                        <option value=3>审核通过</option>
                                        <option value=4>审核未通过</option>
                                        <option value="">全部</option>
                                    </select>
                                </div>
                                <div class="form-group" >
                                    <label>申请日期</label>
                                    <input type="text" class="form-control datepicker"  name="startDate"/>
                                    <span>至</span>
                                    <input type="text" class="form-control datepicker" name="endDate"/>
                                </div>
                                <button type="button" class="btn btn-success" id="btn-search">
                                    <span class="Bold">&emsp;搜索&emsp;</span>
                                </button>
                            </div>
                        </div>
                        <div id="toolbar">
                            <button type="button"  style="margin-right: 10px" class="btn btn-success pull-right" id="btn-submit" shiro:hasPermission="halinv:haladjapp:edit">
                                <span class="Bold">批量审核</span>
                            </button>
                        </div>
                    </form>
                </div>
                <div class="box-body">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</section>

<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var table;
    var colors = ["label-default","label-warning", "label-info","label-success","label-danger"];
    /**
     *全选
     */
    function selectedAll() {
        if ( $('.checkboxAll').is(":checked")) {
            $('.checkbox_select').each(function () {
                this.checked = true;
            });
        } else {
            $('.checkbox_select').each(function () {
                this.checked = false;
            });
        }
    }

    /**
     * 审核不通过库存调整
     */
    function adjApprDisagree(aadId,adjStatus) {
        js.post({
            url: ctx + "half/halInvManage/halfInveAdjAppr/adjDisagree",
            data: {
                id: aadId,
                adjStatus:adjStatus,
            },
            success: function (result) {
                if (result.type === web_status.SUCCESS) {
                    js.modal.success(result.msg);
                    js.table.refresh(table);
                } else {
                    js.modal.warning(result.msg);
                }
                js.modal.closeLoading();
            }
        });
    }


    /**
     * 审核通过库存调整
     */
    function adjApprAgree(aadId,adjStatus, sameOrderNum) {
        if(sameOrderNum == 2){
            js.modal.warning("存在同一单号的两条调整记录，请同时提交!");
        }else{
            js.post({
                url: ctx + "half/halInvManage/halfInveAdjAppr/adjAgree",
                data: {
                    id: aadId,
                    adjStatus: adjStatus
                },
                success: function (result) {
                    if (result.type === web_status.SUCCESS) {
                        js.modal.success(result.msg);
                        js.table.refresh(table);
                    } else {
                        js.modal.warning(result.msg);
                    }
                    js.modal.closeLoading();
                }
            });
        }
    };


    /**
     * 查看库存调整
     */
    function openViewAdj(aadId) {
        js.post({
            url: ctx+"half/halInvManage/halfInveAdjAppr/viewAdj",
            data: {
                id: aadId
            },
            success:function (result) {
                $('#idAppr').val(aadId);
                $('#creatId').val(aadId);
                $("#halfAdjViewForm").fillData(result);
                $("#halfAdjViewCreatForm").fillData(result);
                var differBorderColor = "red";
                var sameBorderColor = "#d2d6de";
                var borderColor = "";
                if ((result.aadBeforeMatName == null || result.aadBeforeMatName == '') &&
                    (result.aadBeforePrice == null || result.aadBeforePrice == '') &&
                    (result.aadBeforeUnit == null || result.aadBeforeUnit == '') &&
                    (result.aadBeforeNum == null || result.aadBeforeNum == '')) {
                    $("#halfAdjViewCreatForm input[name ='aadAfterPrice']").css("border-color", sameBorderColor);
                    $("#halfAdjViewCreatForm input[name ='aadAfterUnit']").css("border-color", sameBorderColor);
                    $("#halfAdjViewCreatForm input[name ='aadAfterMatName']").css("border-color", sameBorderColor);
                    $("#halfAdjViewCreatForm input[name ='aadAfterNum']").css("border-color", sameBorderColor);

                    if ($("#halfAdjViewCreatForm input[name ='aadAfterMatType']").val() == 1) {
                        $("#halfAdjViewCreatForm input[name ='aadAfterMatType']").val("外购件");
                    } else if ($("#halfAdjViewCreatForm input[name ='aadAfterMatType']").val() == 2) {
                        $("#halfAdjViewCreatForm input[name ='aadAfterMatType']").val("外协件");
                    } else if ($("#halfAdjViewCreatForm input[name ='aadAfterMatType']").val() == 3) {
                        $("#halfAdjViewCreatForm input[name ='aadAfterMatType']").val("制作件");
                    } else $("#halfAdjViewCreatForm input[name ='aadAfterMatType']").val("");

                    if ($("#halfAdjViewCreatForm input[name ='aadAfterStockType']").val() == 1) {
                        $("#halfAdjViewCreatForm input[name ='aadAfterStockType']").val("库存在库");
                    } else if ($("#halfAdjViewCreatForm input[name ='aadAfterStockType']").val() == 2) {
                        $("#halfAdjViewCreatForm input[name ='aadAfterStockType']").val("项目在库");
                    } else $("#halfAdjViewCreatForm input[name ='aadAfterStockType']").val("");
                    js.modal.open("modal-viewCreatAdj");
                    js.modal.closeLoading();
                }else {
                    if (result.aadBeforePrice != result.aadAfterPrice) {
                        borderColor = differBorderColor;
                    } else {
                        borderColor = sameBorderColor;
                    }
                    $("#halfAdjViewForm input[name ='aadAfterPrice']").css("border-color", borderColor);

                    if (result.aadBeforeNum != result.aadAfterNum) {
                        borderColor = differBorderColor;
                    } else {
                        borderColor = sameBorderColor;
                    }
                    $("#halfAdjViewForm input[name ='aadAfterNum']").css("border-color", borderColor);

                    if (result.aadBeforeUnit != result.aadAfterUnit) {
                        borderColor = differBorderColor;
                    } else {
                        borderColor = sameBorderColor;
                    }
                    $("#halfAdjViewForm input[name ='aadAfterUnit']").css("border-color", borderColor);

                    if (result.aadBeforeMatName != result.aadAfterMatName) {
                        borderColor = differBorderColor;
                    } else {
                        borderColor = sameBorderColor;
                    }
                    $("#halfAdjViewForm input[name ='aadAfterMatName']").css("border-color", borderColor);

                    if($("#halfAdjViewForm input[name ='aadBeforeMatType']").val() == 1){
                        $("#halfAdjViewForm input[name ='aadBeforeMatType']").val("外购件");
                    }else if($("#halfAdjViewForm input[name ='aadBeforeMatType']").val() == 2){
                        $("#halfAdjViewForm input[name ='aadBeforeMatType']").val("外协件");
                    }else if($("#halfAdjViewForm input[name ='aadBeforeMatType']").val() == 3){
                        $("#halfAdjViewForm input[name ='aadBeforeMatType']").val("制作件");
                    }else $("#halfAdjViewForm input[name ='aadBeforeMatType']").val("");

                    if($("#halfAdjViewForm input[name ='aadBeforeStockType']").val() == 1){
                        $("#halfAdjViewForm input[name ='aadBeforeStockType']").val("库存在库");
                    }else if($("#halfAdjViewForm input[name ='aadBeforeStockType']").val() == 2){
                        $("#halfAdjViewForm input[name ='aadBeforeStockType']").val("项目在库");
                    }else $("#halfAdjViewForm input[name ='aadBeforeStockType']").val("");

                    if($("#halfAdjViewForm input[name ='aadAfterMatType']").val() == 1){
                        $("#halfAdjViewForm input[name ='aadAfterMatType']").val("外购件");
                    }else if($("#halfAdjViewForm input[name ='aadAfterMatType']").val() == 2){
                        $("#halfAdjViewForm input[name ='aadAfterMatType']").val("外协件");
                    }else if($("#halfAdjViewForm input[name ='aadAfterMatType']").val() == 3){
                        $("#halfAdjViewForm input[name ='aadAfterMatType']").val("制作件");
                    }else $("#halfAdjViewForm input[name ='aadAfterMatType']").val("");

                    if($("#halfAdjViewForm input[name ='aadAfterStockType']").val() == 1){
                        $("#halfAdjViewForm input[name ='aadAfterStockType']").val("库存在库");
                    }else if($("#halfAdjViewForm input[name ='aadAfterStockType']").val() == 2){
                        $("#halfAdjViewForm input[name ='aadAfterStockType']").val("项目在库");
                    }else $("#halfAdjViewForm input[name ='aadAfterStockType']").val("");
                    js.modal.open("modal-viewAdj");
                    js.modal.closeLoading();
                }

            }
        })
    }

    /**
     * 打开审核库存盘点
     */
    function openViewCount(aadId) {
        js.post({
            url: ctx+"half/halInvManage/halfInveAdjAppr/viewCount",
            data: {
                id: aadId
            },
            success:function (result) {
                if(result.aadBeAfFlag === 0){
                    $('#idCountAppr').val(aadId);
                    $("#halfCountApprForm").fillData(result);
                    if($("#halfCountApprForm input[name ='aadAfterMatType']").val() == 1){
                        $("#halfCountApprForm input[name ='aadAfterMatType']").val("外购件");
                    }else if($("#halfCountApprForm input[name ='aadAfterMatType']").val() == 2){
                        $("#halfCountApprForm input[name ='aadAfterMatType']").val("外协件");
                    }else if($("#halfCountApprForm input[name ='aadAfterMatType']").val() == 3){
                        $("#halfCountApprForm input[name ='aadAfterMatType']").val("制作件");
                    }else $("#halfCountApprForm input[name ='aadAfterMatType']").val("");

                    if($("#halfCountApprForm input[name ='aadAfterStockType']").val() == 1){
                        $("#halfCountApprForm input[name ='aadAfterStockType']").val("库存在库");
                    }else if($("#halfCountApprForm input[name ='aadAfterStockType']").val() == 2){
                        $("#halfCountApprForm input[name ='aadAfterStockType']").val("项目在库");
                    }else $("#halfCountApprForm input[name ='aadAfterStockType']").val("");
                    js.modal.open("modal-viewCount");
                }else{
                    $('#idCountCreateAppr').val(aadId);
                    $("#halfCountCreateApprForm").fillData(result);
                    if($("#halfCountCreateApprForm input[name ='aadAfterMatType']").val() == 1){
                        $("#halfCountCreateApprForm input[name ='aadAfterMatType']").val("外购件");
                    }else if($("#halfCountCreateApprForm input[name ='aadAfterMatType']").val() == 2){
                        $("#halfCountCreateApprForm input[name ='aadAfterMatType']").val("外协件");
                    }else if($("#halfCountCreateApprForm input[name ='aadAfterMatType']").val() == 3){
                        $("#halfCountCreateApprForm input[name ='aadAfterMatType']").val("制作件");
                    }else $("#halfCountCreateApprForm input[name ='aadAfterMatType']").val("");

                    if($("#halfCountCreateApprForm input[name ='aadAfterStockType']").val() == 1){
                        $("#halfCountCreateApprForm input[name ='aadAfterStockType']").val("库存在库");
                    }else if($("#halfCountCreateApprForm input[name ='aadAfterStockType']").val() == 2){
                        $("#halfCountCreateApprForm input[name ='aadAfterStockType']").val("项目在库");
                    }else $("#halfCountCreateApprForm input[name ='aadAfterStockType']").val("");
                    js.modal.open("modal-viewCountCreate");
                }
                js.modal.closeLoading();
            }
        })
    }

    $(function () {
        /**
         * 加载列表
         */
        table = js.table.init({
            url: ctx + "half/halInvManage/halfInveAdjAppr/apprList",
            showColumns: true,
            showExport: false,
            onLoadSuccess: function (data) {
                var dataSource = $('#bootstrap-table').bootstrapTable('getData', true);
                mergeCells(dataSource, "aadAdjOrderCode", 1, $('#bootstrap-table')); //合并单元格
            },
            columns: [
                {
                    title:'<input class="checkboxAll"  type="checkbox" onclick="selectedAll()" />',

                    // title: '<checkbox:true>',
                    formatter: function (value, row, index) {
                        if (row.aadStatus === 2) {
                            return '<input class="checkbox_select"  type="checkbox" name= "checkbox_select" value="' + $('<div/>').text(row.aadId).html() + '"  data ="'+ $('<div/>').text(row.adjStatus).html() + '"/>';
                        } else {
                            return "";
                        }
                    }
                },
                {title: '序号', field: 'id', width: '40',
                    formatter: function (value, row, index) {
                    return index + 1;}
                },
                {title: '物料描述（铝料类别）', field: 'aadAfterMatName'},
                {title: '图号（模具号）', field: 'aadAfterDrawingNo'},
                {title: '项目名称', field: 'aadAfterProjectName', width: '300'},
                {title: '项目编号', field: 'aadAfterProjectCode', width: '150'},
                {title: '调整类型', field: 'adjStatus', width:'100',
                    formatter: function (value, row, index) {
                        var actions = [];
                        if (row.adjStatus === 1) {
                            return '<span class="badge ' + colors[value] + '">' + '库存调整' + '</span> ';
                        }else if (row.adjStatus === 2){
                            return '<span class="badge ' + colors[value] + '">' + '盘点调整' + '</span> ';
                        }
                    }
                },
                {title: '损溢数量', field: 'ajaDeOvNum'},
                {title: '损溢重量', field: 'ajaDeOvWeight',
                    formatter: function (value, row, index) {
                    return Math.round(value*1000)/1000;
                    }
                },
                {title: '单位', field: 'aadAfterUnit', width: '80'},
                {title: '单价</br>（元）', field: 'aadAfterPrice'},
                {title: '损溢差额</br>（元）', field: 'aadDiffAmount',
                    formatter: function (value, row, index) {
                        if(row.aadAfterMatType == 4){
                            return Math.round(row.ajaDeOvWeight*row.aadAfterPrice*1000)/1000;
                        }else {
                            return row.ajaDeOvNum*row.aadAfterPrice;
                        }
                    }},
                {title:'申请人',field:'aadApplicant', width: '100'},
                {title: '申请时间', field:'aadApplDate', width: '150'},
                {title: '调整原因', field:'aadAfterSpecialInstructions', width: '300'},
                {title: '状态', field:'aadStatus', width: '100',
                    formatter: function (value, row, index) {
                        if (value === 2) {
                            return '<span class="badge ' + colors[value] + '">' + '未审核' + '</span> ';
                        }else if(value === 3){
                            return '<span class="badge ' + colors[value] + '">' + '审核通过' + '</span> ';
                        }else if(value === 4){
                            return '<span class="badge ' + colors[value] + '">' + '审核未通过' + '</span> ';
                        }
                    }
                },
                {
                    title: '操作', width: '100',
                    formatter: function (value, row, index) {
                        var actions = [];
                        if(row.adjStatus === 1){
                            if (row.aadStatus === 2) {
                                if (hasP("halinv:haladjapp:edit")) {
                                    actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="adjApprAgree(' + row.aadId + ','+  row.adjStatus +','+ row.sameOrderNum +')">同意</a> </br>');
                                    actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)"  style="margin-top:2px" onclick="adjApprDisagree(' + row.aadId + ','+  row.adjStatus +')"style="margin-top: 2px">作废</a> </br>');
                                    actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)"  style="margin-top:2px" onclick="openViewAdj(' + row.aadId + ','+  row.adjStatus +')" style="margin-top: 2px">查看</a> ');
                                }
                            }else if (row.aadStatus === 3){
                                if (hasP("halinv:haladjapp:view")) {
                                    actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)"   onclick="openViewAdj(' + row.aadId + ','+  row.adjStatus +')">查看</a> ');
                                }
                            }else if (row.aadStatus ===4) {
                                if (hasP("halinv:haladjapp:edit")) {
                                    actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)"  onclick="adjApprAgree(' + row.aadId + ','+  row.adjStatus +','+ row.sameOrderNum +')">同意</a> </br>');
                                    actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)"  style="margin-top:2px" onclick="openViewAdj(' + row.aadId + ',' + row.adjStatus + ','+  row.aadBeAfFlag +')" style="margin-top: 2px">查看</a> ');
                                }else if(hasP("halinv:haladjapp:view")){
                                actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)"  style="margin-top:2px" onclick="openViewAdj(' + row.aadId + ',' + row.adjStatus + ','+  row.aadBeAfFlag +')" style="margin-top: 2px">查看</a> ');
                                }
                            }
                        }else if (row.adjStatus === 2){
                            if (row.aadStatus === 2) {
                                if (hasP("halinv:haladjapp:edit")) {
                                    actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)"  onclick="adjApprAgree(' + row.aadId + ','+  row.adjStatus +','+ row.sameOrderNum +')">同意</a> </br>');
                                    actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" style="margin-top:2px" onclick="adjApprDisagree(' + row.aadId + ',' + row.adjStatus + ')" style="margin-top: 2px">作废</a> </br>');
                                }else if(hasP("halinv:haladjapp:view")){
                                    actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" style="margin-top:2px"onclick="openViewCount(' + row.aadId + ','+  row.adjStatus +','+  row.aadBeAfFlag +')" style="margin-top: 2px">查看</a> ');
                                }
                            }else if (row.aadStatus === 3){
                                if (hasP("halinv:haladjapp:edit")) {
                                    actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="openViewCount(' + row.aadId + ','+  row.adjStatus +')">查看</a> ');
                                }
                            }else if (row.aadStatus ===4){
                                if (hasP("halinv:haladjapp:edit")) {
                                    actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="adjApprAgree(' + row.aadId + ','+  row.adjStatus +','+  row.sameOrderNum +')">同意</a> </br>');
                                    actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" style="margin-top:2px"  onclick="openViewCount(' + row.aadId + ',' + row.adjStatus + ','+  row.aadBeAfFlag +')" style="margin-top: 2px">查看</a> ');
                                }else if(hasP("halinv:haladjapp:view")){
                                actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" style="margin-top:2px"  onclick="openViewCount(' + row.aadId + ',' + row.adjStatus + ','+  row.aadBeAfFlag +')" style="margin-top: 2px">查看</a> ');
                                }
                            }
                        }
                        return actions.join('');
                    }
                }
            ]
        });

        // 批量审核通过
        $("#btn-submit").click(function () {
            //获取checkbox[name='check']的值
            var arr = new Array(), arr1 = new Array();
            $('input[name="checkbox_select"]:checkbox:checked').each(function(i,value){
                    arr += $(this).attr("value")+",";
            });

            $('input[name="checkbox_select"]:checkbox:checked').each(function(i,data){
                    arr1 += $(this).attr("data")+",";
            });
            if (arr.length <= 0) {
                js.modal.warning("请至少选择一个标记信息");
                return false;
            }
            arr = arr.substring(0,arr.length-1);
            arr1 = arr1.substring(0,arr1.length-1);
            js.modal.confirm("确定要批量审核通过库存调整吗?", function () {

                js.post({
                    url: ctx + "half/halInvManage/halfInveAdjAppr/submit",
                    data: {arr : arr,
                            arr1: arr1
                    },
                    success: function (result) {
                        if (result.type === web_status.SUCCESS) {
                            js.modal.success(result.msg);
                            js.modal.closeLoading();
                            location.reload();
                        }
                            else {
                                js.modal.warning(result.msg);
                            }
                    }
                })
            });
        });

        /**
         * 合并单元格
         * @param data 原始数据（在服务端完成排序）
         * @param fieldName 合并依据属性名称
         * @param spanFieldName 合并属性名称
         * @param colspan 合并列
         * @param target 目标表格对象
         */
        function mergeCells(data, fieldName, colspan, target) {
            var valueArry = new Array();//数组只记录值
            for (var i = 0; i < data.length; i++) {
                for (var prop in data[i]) {
                    if (prop == fieldName) {
                        var key = data[i][prop]
                        valueArry[i] = key;
                        break;
                    }
                }
            }

            var numArry = new Array();//记录值出现的次数  一会就通过循环次数组  合并单元格
            var value = valueArry[0];//初始值
            var num = 0;//记录值出现的次数
            var index1 = 0;//numArry的下标
            for (var i = 0; i <= valueArry.length; i++) {
                if (i == valueArry.length) {//解决最后一次赋值
                    numArry[index1] = num;
                    break;
                }
                if (value == valueArry[i]) {
                    num++;//list下一个值与变量value值相同时，num+1，下标不变
                } else {
                    value = valueArry[i];//如果值不相等就把下一个值   赋值给value变量
                    numArry[index1] = num;//把value变量之前的值 出现的次数记录下来
                    num = 1;// 新的value值出现一次
                    index1++;//下标+1;
                }
            }

            var index = 0;
            var fiedArry = ["aadStatus"];
            for (var i = 0; i < numArry.length; i++) {
                var count = numArry[i] * 1;
                fiedArry.forEach(function (field) {
                    $(target).bootstrapTable('mergeCells', {
                        index: index,
                        field: field,
                        colspan: colspan,
                        rowspan: count
                    });
                });
                index += count;
            }
        }

        /**
         * 表格搜索
         */
        $("#btn-search").click(function () {
            js.table.search(table);
        });
    });
</script>
</body>
</html>